﻿using BusinessLogic.Connectivity.Entities;
using BusinessLogic.Managers.Processing.ProcessingExceptions;
using BusinessLogic.Managers.Processing.RemittanceAdvice;

namespace BusinessLogic.Managers.Processing
{
	public static class DocumentProcessingFactory
	{
		public static IDocumentProcessor GetProcessor(DocumentType documentType)
		{
			switch (documentType)
			{
				case DocumentType.RemittanceAdvice:
					return new RemittanceAdviceProcessor();
				default:
					throw new NotSupportedDocumentTypeException(string.Format("Documents of type '{0}' can not be processed.", documentType));
			}
		}
	}
}
